//
//  LXMallFrame.m
//  LvXi_newVersion
//
//  Created by 王敏 on 16/8/9.
//  Copyright © 2016年 SJT. All rights reserved.
//

#import "LXMallFrame.h"
@implementation LXMallFrame


+(UIImage*)screenShotWithFrame:(CGRect)frame{
    UIView *view = [[[[[UIApplication sharedApplication] windows] objectAtIndex:0] subviews] firstObject];
    UIGraphicsBeginImageContextWithOptions(frame.size,YES,0);
    
    [view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return image;
}



@end
